﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FJASPX.Framwork.Model;

namespace FJASPX.Domain
{
    /// <summary>
    /// 产品
    /// </summary>
    [Serializable]
    public class Product : Entity
    {
        /// <summary>
        /// 用户
        /// </summary>
        public User User { get; set; }
        public string Property { get; set; }
        public int Cid { get; set; }
        public string Area { get; set; }
        public int? Brandid { get; set; }
        public string No { get; set; }
        public decimal? ShopPrice { get; set; }
        public decimal? MarketPrice { get; set; }
        public string RatingdisCount { get; set; }
        public decimal? Donateintegral { get; set; }
        public string Thumbnail { get; set; }
        public string Images { get; set; }
        public string Original { get; set; }
        public string Synopsis { get; set; }
        public string Content { get; set; }
        public string MetaKeywords { get; set; }
        public string MetaDescription { get; set; }
        public string MetaTitle { get; set; }
        public decimal? Weight { get; set; }
        public int? Stock { get; set; }
        public string Unit { get; set; }
        public int? Alarm { get; set; }
        public int? AuditCount { get; set; }
        public int? Audit { get; set; }
        public int? State { get; set; }
        public string Designation { get; set; }
        public string RelatingProID { get; set; }
        public string RelatingArtID { get; set; }
        public DateTime? UpdateTime { get; set; }
        public int? OnClicks { get; set; }
        public int? SaleNumber { get; set; }
        public decimal? CostPrice { get; set; }
        public DateTime? AutoUp { get; set; }
        public DateTime? AutoDown { get; set; }
        public int? IsAuto { get; set; }
        public int? SaleType { get; set; }
        public decimal? IntegralPrice { get; set; }
        public int? PutoutID { get; set; }
        public int? PutoutType { get; set; }
        public string ContentTemplate { get; set; }
        public string Specifications { get; set; }
        public string Parameters { get; set; }
        public int? Type { get; set; }
        public string SpecialSpecifications { get; set; }
        public int UserId { get; set; }
        public string UserName { get; set; }
        public string Price { get; set; }

        public void RemoveState(int state)
        {
            if ((this.State & state) == state)
            {
                this.State = this.State | state;
            }
        }

        public void AddState(int state)
        {
            this.State = this.State ^ state;
        }

    }
}
